Skip to content

Conversation

@kimsehwan96
Copy link
Contributor

@kimsehwan96 kimsehwan96 commented Jan 18, 2026

What type of PR is this?

  • Refactor
  • Feature
  • Bug Fix
  • New Query Runner (Data Source)
  • New Alert Destination
  • Other

Description

Add user impersonation support for Trino data source.

Background

Trino supports user impersonation, which allows query auditing and fine-grained access control by passing the actual user identity to Trino instead of a shared service account.

Changes

  • Added impersonation option to enable/disable user impersonation
  • Added impersonationField option to select which user attribute to use for impersonation:
    • email: Uses the user's email (default)
    • name: Uses the user's name
  • For ApiUser, falls back to name since API keys don't have an associated email

Configuration

Both options are available under "Additional Settings" in the data source configuration.

How is this tested?

  • Unit tests (pytest, jest)
  • E2E Tests (Cypress)
  • Manually
  • N/A
스크린샷 2026-01-18 오후 10 44 48 1. Trino datasource with disabled impersonation and query 스크린샷 2026-01-18 오후 10 45 11 2. Trino datasource with impersonation as email and query 스크린샷 2026-01-18 오후 10 45 29 2. Trino datasource with impersonation as name and query

Related Tickets & Documents

Mobile & Desktop Screenshots/Recordings (if there are UI changes)

@kimsehwan96 kimsehwan96 force-pushed the add-trino-impersonation-options branch from 4dab221 to 0e4731b Compare January 18, 2026 13:50
Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

@kimsehwan96 kimsehwan96 force-pushed the add-trino-impersonation-options branch from 0e4731b to 5d1e431 Compare January 18, 2026 23:41
@kimsehwan96 kimsehwan96 force-pushed the add-trino-impersonation-options branch from 5d1e431 to c9dfe57 Compare January 19, 2026 07:44
Copy link
Contributor

@yoshiokatsuneo yoshiokatsuneo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have not tested it.

But I believe I can approve it as:

  • The PR author looks tested well.
  • The changed code looks good.
  • There is no test failure.

@yoshiokatsuneo yoshiokatsuneo merged commit bc0add4 into getredash:master Jan 24, 2026
11 checks passed
@yoshiokatsuneo
Copy link
Contributor

@kimsehwan96

Thank you for your contribution with detailed description !
As I believe the PR makes redash more useful, I just approved and merged.

@kimsehwan96
Copy link
Contributor Author

@yoshiokatsuneo Thank you for the fast review and merge!
I think Presto could use this feature as well (since Trino is a forked version of Presto), but I haven't used Presto myself, so I'll leave that to someone else who's more familiar with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants